#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H
#include <QWidget>

#include "ElaContentDialog.h"
#include "ElaWidget.h"


class LoginWidget;
class SignInWidget;
class QStackedWidget;
class QHBoxLayout;

class LoginDialog : public ElaWidget
{
    Q_OBJECT
public:
    explicit LoginDialog(QWidget *parent = nullptr);
    ~LoginDialog();

    void initUI();
    void initConnections();
signals:
    void accepted(const QString &username, const QString &password);  // 登录成功信号
    void rejected();  // 窗口关闭信号

protected:
    void closeEvent(QCloseEvent *event) override;

private:
    LoginWidget *m_login;
    SignInWidget *m_sigin;

    QStackedWidget *m_stackedWidget;

    QHBoxLayout *m_layout;
};

#endif // LOGINDIALOG_H
